package dataserver.api;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.annotation.JSONType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@JSONType(orders = {  "success","msg", "data","code" })
public class IesLabResponseInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    private Boolean success = true;
    private String msg = "成功";
    private JSONArray data;
    private Integer code = 200;

    public IesLabResponseInfo(JSONArray retData) {
        this.code = 200;
        this.msg = "成功";
        this.data = retData;
    }

    public IesLabResponseInfo(String errorInfo) {
        this.code = 500;
        this.msg = errorInfo;
        this.data = null;
    }
}
